1. Field of the Invention
The present invention relates generally to Extensible Markup Language (XML), and in particular, to a method, apparatus, and article of manufacture for using and processing redline or markup documents based on an XML schema.
2. Description of the Related Art
The internet is widely utilized to transmit and receive information in the form of web pages that are translated/interpreted and displayed by a web browser on a computer. Document definition languages are interpreted by a web browser and define how a document or information is to be displayed in the browser. Further, sets of rules, referred to as schemas, may provide for a particular structure of information. For example, an address schema may comprise constraints and limitations as to the order and sequence of elements and datatypes that define an address.
Computer graphics programs such as AutoCAD® permit users to redline or markup drawings. The redlines/markups may be stored in a file separate from the original drawing. Further, the redlines/markups may be transmitted across the internet and viewed/utilized by other users. However, the format and structure of redline/markup files may differ depending on the application utilized. Consequently, a consistent structure/schema that is utilized regardless of the application is desirable. The prior art does not provide for a redline or markup schema. These problems may be better understood by describing document definition languages and schemas.
So that a browser can interpret and display a web page, document definition languages and standard programming languages are utilized to define the web page. For example, hypertext markup language (HTML) is widely used to define web pages. However, HTML utilizes a predefined set of “tags” to describe elements on the web page. As a result, extensible markup language (XML) has become and is becoming more widely used on the internet. XML is more flexible than HTML and allows tags to be defined by the developer of the web page. Thus, tags for virtually any data items such as product, sales rep and amount due, can be used for specific applications, allowing web pages to function like database records.
XML provides a fairly complete set of tools for describing the parts of a document (elements), annotating those parts (attributes), and constraining the parts that can appear within the elements and attributes (content models and attribute types). Schemas use declarations to describe rules and constraints for elements and attributes, building a framework for documents out of a fairly small set of declarations. Declarations create a vocabulary and a set of constraints, identifying content and where it is to appear. Many schemas can be built using only a combination of element and attribute declarations, while other declarations (like entities and notations) can supplement these core declarations when needed in a particular situation.
Elements and attributes are the core structures of XML, the key features with which document content is built and annotated. Elements and attributes ‘mark up’ text into easily processed segments, labeled for identification. XML schemas describe the structure of those labels and identify (with varying degrees of precision) the material they may contain. Both elements and attributes may be used to contain simple data types, from basic text types to the sophisticated and complex data types proposed in XML-Data and other schema proposals. Only elements may contain structured content, storing elements within elements and defining potentially complex structure.
Elements and attributes have a number of key differences. Attributes cannot hold subcomponents—no child elements or attributes are allowed within an element. An application can still parse the content within an attribute value into smaller components, if it wants, but XML itself doesn't provide that facility. Attributes are always assigned to particular elements, while elements can appear inside of any other element as a child element if that element permits it. Attribute values can be set through default or fixed values set in the schema. Elements may have to contain certain other elements or text, but the actual value of that content cannot be fixed from the schema.
Attributes tend to be simpler, typically holding less (though often just as important) information that annotates an element. In general, elements annotate the content of a document, and attributes annotate elements. In practice, the limitations of attributes do restrict their use to some extent, although their ability to have defaults sometimes leads to their use in place of elements.
Schemas can constrain content for elements and attributes, requiring that the content within them meet certain criteria. In addition to identifying attribute types, attribute type declarations include a default declaration for each attribute. Default values allow schema developers to provide values for attributes, require that document authors provide values, or fix the value permanently. This makes it much easier to ensure that information appears when it should without requiring an enormous amount of extra markup within documents.
Thus, as described above, a schema is a model for describing the structure of information. An XML schema describes a model for a whole class of documents. The model describes the possible arrangement of tags and text in a valid document. A schema may also be viewed as an agreement on a common vocabulary for a particular application that involves exchanging documents. In schemas, models are described in terms of constraints. A constraint defines what can appear in any given context. As described, there are basically two kinds of constraints: content model constraints and datatype or attribute constraints. Content model constraints describe the order and sequence of elements and datatype or attribute constraints describe valid units of data.
For example, a schema might describe a valid <address> with the content model constraint that it consist of a <name> element, followed by one or more <street> elements, followed by exactly one <city>, <state>, and <zip> element. The content of a <zip> might have a further datatype or attribute constraint that it consist of either a sequence of exactly five digits or a sequence of five digits, followed by a hyphen, followed by a sequence of exactly four digits. No other text is a valid zip code. Once a schema is defined, documents may be interpreted or parsed in accordance with the schema. If the parsed document adheres to all of the specified constraints, the document is “valid”. If the document does not adhere to all of the specified constraints, the document is invalid. The ability to test the validity of document is an important aspect of large web applications that are receiving and sending information to and from lots of sources. If a server is receiving XML transactions over the web, it is undesirable to process the content into a database if the information received is not in the proper format/schema.
Thus, although redline/markup documents are available in various applications and XML is becoming widely utilized, the prior art does not provide for a redline/markup schema.